package com.jiazhong.text;

public class Test02 {
    public static void main(String[] args) {
        Test02 ps=new Test02();
        ps.One();
        ps.Two();
    }
    public void One(){
        int one,sum=0;
        for (one=1;one<=99;one+=2){
            sum+=one;
        }
        System.out.println("第一问和sum为");
        System.out.println(sum);
    }
    public void Two(){
        int two=1,sum=0;
        for (two=1;two<=256;two*=2){
            sum+=two;
        }
        System.out.println("第二问和sum为");
        System.out.println(sum);
    }
}
